<?php

class register extends Controller
{
    public function index()
    {       
		require APP . 'views/site_templates/header.php';
        require APP . 'views/site_templates/register.php';
        require APP . 'views/site_templates/footer.php';
    }
    
	public function register(){
        if (isset($_POST["submit_register"])) {
            $this->model->register($_POST["username"],$_POST["password"]);
        }
        header('location: ' . URL . 'views/home/index.php');
    }
}
